<?php

namespace Regard\ProductsBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class BrandType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name','text')
            ->add('logo', 'file', array('data_class' => null,
										'property_path' => 'logo'))
            ->add('toShow', 'checkbox', array('required' => false))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Regard\ProductsBundle\Entity\Brand'
        ));
    }

    public function getName()
    {
        return 'regard_productsbundle_brandtype';
    }
}
